package com.zx.club.oss.controller;

import com.zx.club.oss.service.FileService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * 文件服务
 * @author zx
 * @date 2025-03-20 09:06
 */
@RestController
public class FileController {

    @Resource
    private FileService fileService;

    @PostMapping("/upload")
    public String upload( @RequestParam("file") MultipartFile file){
        return fileService.upload(file);
    }
}
